package net.pws.common.persistence.jdbc;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class OracleJdbcFinder extends JdbcDaoSupportOracleExtension {
    
    protected Log log = LogFactory.getLog(getClass());
    
    
    public void handleConditon(String parameterValue,
                               String parameterName,
                               StringBuffer sb,
                               List parameterList) {
        String[] parameterValueList = parameterValue.split(",");
        String condition = "";
        for (int i = 0; i < parameterValueList.length; i++) {
            String parameter = parameterValueList[i];
            if (condition.equals(""))
                condition = "?";
            else
                condition += ",?";
            parameterList.add(parameter);
        }
        sb.append(" and " + parameterName + " in (" + condition + ") ");
    }
    
}
